package c;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

@Component
public class Business {

	@Autowired
	@Qualifier("floppyWriter")
	private IDeviceWriter writer;
	@Value("hello annotation...")
	private String string;
	
	public Business() {
		
	}
	
	public Business(IDeviceWriter writer) {
		super();
		this.writer = writer;
	}

	public void save() {
		writer.saveToDevice();
		System.out.println(string);
	}
	
}
